interface Shape{
    name: string;
    width: number;
    height: number;
    color?:string;
}

function area(shape : Shape){
    var area = shape.width * shape.height;
    return "I'm " + shape.name + " with area " + area + " cm squared";
}

class ShapeEntity implements Shape{
    name: string;    width: number;
    height: number;
    color?: string;
}

let shape1 = new ShapeEntity();
shape1.name = "fish";
shape1.width = 30;
shape1.height = 30;

console.log(area(shape1));
